home *** CD-ROM | disk | FTP | other *** search
- #ifndef __STAT_H
- #define __STAT_H
-
- /* Since older versions of the Lattice C compiler for Amiga, and all current */
- /* versions of the Manx Aztec C compiler for Amiga, either provide no stat() */
- /* function or provide one inadequate for unzip (Aztec's has no st_mode */
- /* field), we provide our own stat() function in stat.c by Paul Wells, and */
- /* this fake stat.h file by Paul Kienitz. Paul Wells originally used the */
- /* Lattice stat.h but that does not work for Aztec and is not distributable */
- /* with this package, so I made a separate one. This has to be pulled into */
- /* unzip.h when compiling an Amiga version, as "amiga/z-stat.h". */
-
- /* This include file should ONLY be loaded if AZTEC_C is defined, and
- * you are using the substitute version of stat() from amiga/stat.c.
- */
-
- struct stat {
- char st_attr;
- long st_ctime;
- long st_atime;
- long st_mtime;
- long st_size;
- long st_mode;
- long st_ino;
- long st_blocks;
- long st_blksize;
- short st_dev, st_nlink, st_uid, st_gid, st_rdev; /* not used */
- };
-
- /* These st_mode values are completely random, but that doesn't matter: */
-
- #define S_IFDIR 0x1000
- #define S_IFREG 0x2000
- #define S_IFMT (S_IFDIR|S_IFREG)
-
- #if 0 /* S_IFLNK zapped per PaulK */
- #define S_IFLNK 0x4000
- #endif
-
- #define S_IFSOCK 0x800
- #define S_IFCHR 0x400
- #define S_IFIFO 0x200
-
- #define S_ISCRIPT (1<<6)
- #define S_IPURE (1<<5)
- #define S_IARCHIVE (1<<4)
- #define S_IREAD (1<<3)
- #define S_IWRITE (1<<2)
- #define S_IEXECUTE (1<<1)
- #define S_IDELETE (1<<0)
-
- #endif __STAT_H
-